From: Marco Trevisan (TreviƱo) Date: Mon, 11 Mar 2019 20:40:45 +0000 (-0400) Subject: magnifier: Invalidate content size when it changes X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~871^2^2~9 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=8146e9d52701ff8e2a1851ff507b329788518769;p=gnome-shell.git magnifier: Invalidate content size when it changes In case the content size changes we need to invalidate its size in order to trigger a full actor relayout. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/443 --- diff --git a/js/ui/magnifier.js b/js/ui/magnifier.js index 3d05615ee..f6b0e9550 100644 --- a/js/ui/magnifier.js +++ b/js/ui/magnifier.js @@ -84,8 +84,14 @@ var MouseSpriteContent = GObject.registerClass({ if (this._texture == coglTexture) return; + let oldTexture = this._texture; this._texture = coglTexture; this.invalidate(); + + if (!oldTexture || + oldTexture.get_width() != coglTexture.get_width() || + oldTexture.get_height() != coglTexture.get_height()) + this.invalidate_size(); } });